#include "stdafx.h"

#include "Statement.h"

CStatementFunctionAssign::CStatementFunctionAssign(CStatementFunction fn,
												   CVariable *svar)
{
	m_FunctionStatement = fn;
	m_Var = svar;
	m_Type = tStatementFunctionAssign;
}

CStatementFunctionAssign::CStatementFunctionAssign()
{
}

CStatementFunctionAssign::~CStatementFunctionAssign()
{
	delete m_Var;
}

bool CStatementFunctionAssign::Execute()
{
	bool rtn = true;

	m_FunctionStatement.Execute();
	// m_Var->SetVal(m_FunctionsStatement.GetFunctionReturn);
	// uncomment when variable operator overloads are written
	// m_Var = m_FunctionsStatement.GetFunctionsReturn;

	return rtn;
}